#include "Entity.h"

Entity::Entity(const sf::Vector2f& position, AnimatedSpritePtr sprite)
: position(position)
, sprite(sprite)
{
}

Entity::~Entity()
{
}

sf::Vector2f Entity::getPosition() const 
{ 
    return position; 
}

void Entity::setPosition(const sf::Vector2f& position) 
{ 
    this->position = position; 
}

sf::Vector2f Entity::getVelocity() const 
{ 
    return velocity; 
}

void Entity::setVelocity(const sf::Vector2f& velocity) 
{ 
    this->velocity = velocity; 
}

AnimatedSpritePtr Entity::getSprite() const
{
    return sprite;
}

void Entity::setSprite(AnimatedSpritePtr sprite)
{
    this->sprite = sprite;
}

void Entity::move(const sf::Vector2f& distance)
{
    setPosition(getPosition() + distance);
}